1. Field of the Invention
The present invention relates to error correction and restarting instructions in decoders having an alias mechanism.
2. Description of Related Art
Computers process information by executing a sequence of instructions, which may be supplied from a computer program written in a particular format and sequence designed to direct the computer to perform a particular sequence of operations. Most computer programs are written in high level languages such as FORTRAN or "C" which are not directly executable by the computer processor. In order to run these high level programs, the program is compiled by a compiler program that translates the higher level instructions into macroinstructions having a format that can be decoded and executed. The compiled macroinstructions are supplied to a decoder residing within the processor, where each macroinstruction is decoded into one or more micro-operations which are executable by execution units within the microprocessor.
During execution of a micro-operation, conditions may occur which cause an error to occur. Examples of errors include exceptions and faults that may be caused by, for example, overflow and/or underflow. Often, these errors can be corrected by the processor itself. In such an instance, the error event is transmitted to a fault handler, which then directs execution of an assist sequence that "assists" the instruction to completion. For example, it may provide a result, or it may signal an error condition. Also, an assist routine may repair a condition and then direct a restart of the micro-operation sequence. Typically, the assist sequence is included in microcode ROM, and therefore, the fault handler generates an entry point into the microcode ROM, and then passes control to the microcode sequencer to handle the exception.
One problem with handling exceptions by an assist is that the error-causing macroinstruction or its micro-operations may include information that is needed during the assist. This needed information is termed the "state" of the decoder, and includes information stored in alias registers. However, by the time that the error is discovered and the exception reported, it is highly likely that many additional micro-operations and possibly additional macroinstructions have been decoded and passed through the decoder, and therefore it is highly likely that the state of the decoder has been lost. For a decoder that has alias registers, the information within those registers would also have been lost. In order to properly handle the assist, the decoder state must be recovered to the state that existed when the error-causing micro-operation was decoded.
Some assist routines require restarting the micro-operation sequence after the error-causing condition has been repaired. The designated micro-operation at which restart will occur may be somewhere intermediate within a micro-operation sequence, and if the restart target is at such a location, then state recovery is required in order to recover the decoder state.
In summary, assist and restart implementations require a state recovery mechanism. It is highly advantageous if such a state recovery mechanism is efficient, accurate, and consumes little computer time. Such a state recovery mechanism could simplify assist handling and increase performance.
It would also be an advantage to provide a system that allows restarting an instruction anywhere within the micro-operation sequence of the error-causing macroinstruction. Such a restart mechanism would provide substantial flexibility to a microcode programmer.